#ifndef _search_h
#define _search_h

#include "common.h"

#define KEIL 1

#define   ABS(x)	                  (((x)>0)?(x):(-(x)))
#define   MID_VIDEO_POINT           81              //图像中心点
#define   MAX_VIDEO_POINT         162             //???????
#define   MAX_VIDEO_LINE	        60              //?????????

extern int IMAGE_MIDDLE;
////************控制变量*************************//
extern int   g_DirectionControlWhole;
extern int   g_DirectionControlLine;
extern int   g_DirectionControl;
extern int   g_FormerDirectionControl;

extern int          g_CenterNum;
extern int          g_LeftEdgeNum, g_RightEdgeNum;
//==============================图像处理用变量==========================//
extern uint16       g_Start[10], g_End[10], g_SEnum;
extern uint8        g_SearchFlag;
extern int          g_Cover;
extern uint8        g_CoverIndex[10],g_CoverNum;
extern uint8        g_VideoImageData[MAX_VIDEO_LINE][MAX_VIDEO_POINT]; 
extern void Search();
extern int CharacterSearch();
extern int Flag;
extern void GoToCarage();
extern int StopFlag;
extern int FlagCarage[5];

#endif